﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Automobile.service.Model;
using Automobile.service.DAL;
using System.Data;

namespace Automobile.service.BLL
{
    public class WareHoseBLL
    {
        WareHoseDAL dal = new WareHoseDAL();
        /// <summary>
        /// 显示库房
        /// </summary>
        /// <returns></returns>
        public List<WareHose> ShowWareHose()
        {
            return dal.ShowWareHose();
        }
        /// <summary>
        /// 添加库房
        /// </summary>
        /// <param name="w"></param>
        /// <returns></returns>
        public int AddWareHose(WareHose w)
        {
            return dal.AddWareHose(w);
        }
        /// <summary>
        /// 删除仓库
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int Del(int id)
        {
            return dal.Del(id);
        }
        /// <summary>
        /// 根据id获取仓库单条信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public DataTable GetWareHoseById(int id)
        {
            return dal.GetWareHoseById(id);
        }
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="w"></param>
        /// <returns></returns>
        public int UpdWareHose(WareHose w)
        {
            return dal.UpdWareHose(w);
        }
        /// <summary>
        /// 根据仓库名查询库房
        /// </summary>
        /// <returns></returns>
        public List<WareHose> SearchWareHose(string WareHose_Name)
        {
            return dal.SearchWareHose(WareHose_Name);
        }
        public int count()
        {
            return dal.count();
        }
    }
}
